home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 25
/
Cream of the Crop 25.iso
/
program
/
ny_src.zip
/
NYEDIT.H
< prev
next >
Wrap
C/C++ Source or Header
|
1997-04-22
|
7KB
|
230 lines
// 0 - Critical Door error (no fossil, etc.)
// 1 - Carrier lost, user off-line
// 2 - Sysop terminated call, user off-line
// 3 - User time used up, user STILL ON-LINE
// 4 - Keyboard inactivity timeout, user off-line
// 10 - User chose to return to BBS
// 11 - User chose to logoff, user off-line
// 12 - Critical RAVote error
//#include <process.h>
#include <math.h>
//#include <dos.h>
#include <dir.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <errno.h>
//#include <ctype.h>
#include <share.h>
//#include <locking.h>
#include <conio.h>
#include <io.h>
//#include <fcntl.h>
//#include <sys\stat.h>
#include "\odoors\opendoor.h" // Must be included in all doors
#define USER_FILENAME "NY2008.USR"
//#define ENEMY_FILENAME "NY2008.ENM"
//#define ENEMY_INDEX "NY2008.ENI"
#define MAX_USERS 30000
#define FILE_ACCESS_MAX_WAIT 40
#define LEVELS 21
//typedef enum {HANDS,PEPPER,KNIFE,CHAIN,GUN,RIFLE,LASER_GUN,SHOTGUN,MACHINEGUN,GRANADE_LAUNCHER,BLASTER,A_BOMB} weapon;
typedef enum {HANDS,
PEPPER,
KNIFE,
CHAIN,
GUN,
RIFLE,
LASER_GUN,
SHOTGUN,
MACHINEGUN,
GRANADE_LAUNCHER,
BLASTER,
A_BOMB,
SHARP_STICK,
SCREWDRIVER,
HAMMER,
LEAD_PIPE,
COLT,
ELEPHANT_GUN,
NAILGUN,
ASSAULT_RIFLE,
PROTON_GUN,
NEUTRON_PHASER,
ULTRASOUND_GUN} weapon;
/*long gun_price[A_BOMB+1]={0, 50, 100, 200, 500,1000, 2000, 5000, 10000, 20000, 50000, 250000};
*/
typedef enum {POT,HASH,LSD,COKE,PCP,HEROIN} drug_type;
/*int drug_price[HEROIN+1]={10, 25, 50, 100, 150,200};
*/
typedef enum {MALE,FEMALE} sex_type;
typedef enum {HEADBANGER,HIPPIE,BIG_FAT_DUDE,CRACK_ADDICT,PUNK} guy_type;
typedef enum {NONE,CRAPS,HERPES,SYPHILIS,AIDS} desease;
typedef enum {ALIVE,UNCONCIOUS,DEAD} guy_status;
typedef enum {NOWHERE,MOTEL,REG_HOTEL,EXP_HOTEL} hotel_type;
int main(int argc,char *argv[]); // Function prototype declarations
char entry_menu(void); // Menu draw...
void DisplayStats(void);
void print_drug(drug_type drug);
void print_arm(weapon arm);
void ny_kernel(void);
void print_disease(desease ill);
void WaitForEnter(void);
void WriteCurrentUser(int user_num);
//FILE *ExculsiveFileOpen(char *pszFileName, char *pszMode);
void CustomConfigFunction(char *pszKeyword, char *pszOptions);
void strzcpy(char dest[],const char src[], int beg,int end);
void cap_names(char name[]);
void dump(void);
void ny_disp_emu(char line[]);
void get_bbsname(char bbsname[]);
int seereg(char bbsname[]);
FILE *ShareFileOpen(char *pszFileName, char *pszMode);
size_t ny_fread(const void *ptr, size_t size, size_t n, FILE*stream);
size_t ny_fwrite(const void *ptr, size_t size, size_t n, FILE*stream);
//void ChangeOnlineRanks(void);
void SortScrFile(int usr);
void SortScrFileB(int usr);
void ch_game_d(void);
void ch_flag_d(void);
void set_points(unsigned long raise);
/*typedef struct {
int first_enemy[LEVELS],
last_enemy[LEVELS];
} enemy_idx;*/
//Player User File structure (beta6+)
typedef struct {
//character files
char bbsname[36], //the BBS name of the user
name[25], //the name of the character
say_win[41], //what the user says when he wins
say_loose[41]; // " " " " " " looses
//integer records
int rank, //user rank
days_not_on, //days the user has been inactive
strength, //attacking strenght of the user
defense, //defensive strenght
condoms, //condoms user has
since_got_laid, //days since the user last got laid
drug_hits, //the hist that the user has
drug_days_since; //if addicted how long the user
//has not used the drug
//long type records
long hitpoints, //users hitpoints
maxhitpoints; //maximum of the users hitpoints
//unsigned long type record
unsigned long points, //users points
money, //money in hand
bank; //money in bank
//unsigned char type records used as values
unsigned char level, //user level
turns, //fight the user has left today
hunger, // % of hunger
sex_today, //sex turns left today
std_percent, // % of current std
drug_addiction, // % of drug addiction
drug_high, // % of how "high" the player is
hotel_paid_fer, //for how many more days the hotel
//is paid for
days_in_hospital;//how many days has the use been
//in hospital
/*enumerated types stored as char!!! (not int)*/
guy_status alive; //user: alive, unconsious, or dead
sex_type sex; //user sex: Male, Female
guy_type nation; //what is he:
//punk, headbanger ...
weapon arm; //players weapon
desease std; //current player std
drug_type drug; //current player drug type
hotel_type rest_where; //where the user is staying lately
/*added values BETA 9*/
char wtc; //# of wtc bombings allowed per day
//default=1
char poison; //number of poisoning of watr allowed
//per day, default=1
/*added values v0.10*/
unsigned char rocks, //Rocks, usable in fights
throwing_ability,//Throwing ability 0-100
punch_ability, //Punching ability 0-100
kick_ability; //Kicking ability 0-100
/*reserved for future use 4 bytes reset to 0*/
int res1,
res2;
} user_rec;
/*typedef struct {
char bbsname[36],
name[25];
guy_type nation;
int level,
rank;
unsigned long points,
money,
bank;
guy_status alive;
int days_not_on;
sex_type sex;
char say_win[41],
say_loose[41];
int turns,
hunger,
strength,
defense;
long hitpoints,
maxhitpoints;
weapon arm;
int condoms;
int since_got_laid;
int sex_today;
desease std;
int std_percent;
drug_type drug;
int drug_hits,
drug_addiction,
drug_high,
drug_days_since;
hotel_type rest_where;
unsigned char hotel_paid_fer,
days_in_hospital;
} user_rec;*/
typedef struct {
char name[25];
guy_type nation;
char n1;
int level;
unsigned long points;
guy_status alive;
char n2;
sex_type sex;
char n3;
int user_num,
online;
} scr_rec;